/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import java.awt.Color;
/*     */ import java.util.ArrayList;
/*     */ import java.util.List;
/*     */ import net.minecraft.client.renderer.BufferBuilder;
/*     */ import net.minecraft.client.renderer.GlStateManager;
/*     */ import net.minecraft.client.renderer.Tessellator;
/*     */ import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
/*     */ import org.yaml.snakeyamla.configuration.ConfigurationSection;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class zu
/*     */   extends gy
/*     */ {
/*     */   private String z;
/*     */   private String i;
/*     */   private int w;
/*     */   private int q;
/*     */   private int g;
/*     */   
/*     */   public zu(ConfigurationSection configurationSection) {
/*  28 */     super(configurationSection);
/*  29 */     this.w = v(configurationSection.getString("startcolor", "#ffffffff"));
/*  30 */     this.q = v(configurationSection.getString("endcolor", "#ffffffff"));
/*  31 */     this.z = String.valueOf(configurationSection.get("width", "0"));
/*  32 */     this.i = String.valueOf(configurationSection.get("height", "0"));
/*     */   }
/*     */   
/*     */   public double t() {
/*  36 */     return v().v(this.z);
/*     */   }
/*     */   
/*     */   public double h() {
/*  40 */     return v().v(this.i);
/*     */   }
/*     */ 
/*     */ 
/*     */   
/*     */   public void v() {
/*  46 */     GlStateManager.func_179094_E();
/*     */     
/*  48 */     GlStateManager.func_179137_b(z(), v(), 0.0D);
/*  49 */     z(0, 0.0D, 0.0D, t(), h(), this.w, this.q);
/*  50 */     GlStateManager.func_179121_F();
/*     */   }
/*     */ 
/*     */   
/*     */   public static int v(String a) {
/*     */     try {
/*  56 */       if (a.length() == 7 || (a.length() == 9 && a.startsWith("#")))
/*     */       {
/*  58 */         List<Integer> list = new ArrayList();
/*     */         
/*  60 */         for (int i = 1; i < a.length(); i += 2) {
/*  61 */           String str = a.substring(i, i + 2);
/*  62 */           list.add(Integer.valueOf(Integer.parseInt(str, 16)));
/*     */         } 
/*  64 */         if (list.size() == 3) {
/*  65 */           return v(new Color(((Integer)list.get(0)).intValue(), ((Integer)list.get(1)).intValue(), ((Integer)list.get(2)).intValue()));
/*     */         }
/*  67 */         return v(new Color(((Integer)list.get(1)).intValue(), ((Integer)list.get(2)).intValue(), ((Integer)list.get(3)).intValue(), ((Integer)list.get(0)).intValue()));
/*     */       }
/*     */     
/*  70 */     } catch (Exception exception) {
/*  71 */       exception.printStackTrace();
/*     */     } 
/*  73 */     return v(Color.WHITE);
/*     */   }
/*     */   
/*     */   public static int v(Color a) {
/*  77 */     return a.getAlpha() << 24 | a.getRed() << 16 | a.getGreen() << 8 | a.getBlue();
/*     */   }
/*     */   
/*     */   public void z(int i, double d1, double d2, double d3, double d4, int j, int k) {
/*  81 */     float f1 = (j >> 24 & 0xFF) / 255.0F;
/*  82 */     float f2 = (j >> 16 & 0xFF) / 255.0F;
/*  83 */     float f3 = (j >> 8 & 0xFF) / 255.0F;
/*  84 */     float f4 = (j & 0xFF) / 255.0F;
/*  85 */     float f5 = (k >> 24 & 0xFF) / 255.0F;
/*  86 */     float f6 = (k >> 16 & 0xFF) / 255.0F;
/*  87 */     float f7 = (k >> 8 & 0xFF) / 255.0F;
/*  88 */     float f8 = (k & 0xFF) / 255.0F;
/*     */     
/*  90 */     GlStateManager.func_179090_x();
/*  91 */     GlStateManager.func_179147_l();
/*  92 */     GlStateManager.func_179118_c();
/*  93 */     GlStateManager.func_187428_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
/*  94 */     GlStateManager.func_179103_j(7425);
/*     */     
/*  96 */     Tessellator tessellator = Tessellator.func_178181_a();
/*  97 */     BufferBuilder bufferBuilder = tessellator.func_178180_c();
/*  98 */     bufferBuilder.func_181668_a(7, DefaultVertexFormats.field_181706_f);
/*     */ 
/*     */ 
/*     */     
/* 102 */     if (this.g == 0) {
/* 103 */       bufferBuilder.func_181662_b(d3, d2, i).func_181666_a(f2, f3, f4, f1).func_181675_d();
/* 104 */       bufferBuilder.func_181662_b(d1, d2, i).func_181666_a(f2, f3, f4, f1).func_181675_d();
/* 105 */       bufferBuilder.func_181662_b(d1, d4, i).func_181666_a(f6, f7, f8, f5).func_181675_d();
/* 106 */       bufferBuilder.func_181662_b(d3, d4, i).func_181666_a(f6, f7, f8, f5).func_181675_d();
/* 107 */     } else if (this.g == 1) {
/* 108 */       bufferBuilder.func_181662_b(d1, d2, i).func_181666_a(f2, f3, f4, f1).func_181675_d();
/* 109 */       bufferBuilder.func_181662_b(d1, d4, i).func_181666_a(f2, f3, f4, f1).func_181675_d();
/* 110 */       bufferBuilder.func_181662_b(d3, d4, i).func_181666_a(f6, f7, f8, f5).func_181675_d();
/* 111 */       bufferBuilder.func_181662_b(d3, d2, i).func_181666_a(f6, f7, f8, f5).func_181675_d();
/* 112 */     } else if (this.g == 2) {
/*     */       
/* 114 */       bufferBuilder.func_181662_b(d3, d2, i).func_181666_a(f2, f3, f4, f1).func_181675_d();
/* 115 */       bufferBuilder.func_181662_b(d1, d2, i).func_181666_a(f6, f7, f8, f5).func_181675_d();
/* 116 */       bufferBuilder.func_181662_b(d1, d4, i).func_181666_a(f2, f3, f4, f1).func_181675_d();
/* 117 */       bufferBuilder.func_181662_b(d3, d4, i).func_181666_a(f6, f7, f8, f5).func_181675_d();
/* 118 */     } else if (this.g == 3) {
/* 119 */       bufferBuilder.func_181662_b(d3, d2, i).func_181666_a(f6, f7, f8, f5).func_181675_d();
/* 120 */       bufferBuilder.func_181662_b(d1, d2, i).func_181666_a(f2, f3, f4, f1).func_181675_d();
/* 121 */       bufferBuilder.func_181662_b(d1, d4, i).func_181666_a(f6, f7, f8, f5).func_181675_d();
/* 122 */       bufferBuilder.func_181662_b(d3, d4, i).func_181666_a(f2, f3, f4, f1).func_181675_d();
/*     */     } 
/*     */     
/* 125 */     tessellator.func_78381_a();
/*     */     
/* 127 */     GlStateManager.func_179103_j(7424);
/* 128 */     GlStateManager.func_179084_k();
/* 129 */     GlStateManager.func_179141_d();
/* 130 */     GlStateManager.func_179098_w();
/*     */   }
/*     */   
/*     */   public static void v(int a, double d1, double d2, double d3, double d4, int i, int j) {
/* 134 */     float f1 = (i >> 24 & 0xFF) / 255.0F;
/* 135 */     float f2 = (i >> 16 & 0xFF) / 255.0F;
/* 136 */     float f3 = (i >> 8 & 0xFF) / 255.0F;
/* 137 */     float f4 = (i & 0xFF) / 255.0F;
/* 138 */     float f5 = (j >> 24 & 0xFF) / 255.0F;
/* 139 */     float f6 = (j >> 16 & 0xFF) / 255.0F;
/* 140 */     float f7 = (j >> 8 & 0xFF) / 255.0F;
/* 141 */     float f8 = (j & 0xFF) / 255.0F;
/*     */     
/* 143 */     GlStateManager.func_179090_x();
/* 144 */     GlStateManager.func_179147_l();
/* 145 */     GlStateManager.func_179118_c();
/* 146 */     GlStateManager.func_187428_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
/* 147 */     GlStateManager.func_179103_j(7425);
/*     */     
/* 149 */     Tessellator tessellator = Tessellator.func_178181_a();
/* 150 */     BufferBuilder bufferBuilder = tessellator.func_178180_c();
/* 151 */     bufferBuilder.func_181668_a(7, DefaultVertexFormats.field_181706_f);
/* 152 */     bufferBuilder.func_181662_b(d3, d2, a).func_181666_a(f2, f3, f4, f1).func_181675_d();
/* 153 */     bufferBuilder.func_181662_b(d1, d2, a).func_181666_a(f2, f3, f4, f1).func_181675_d();
/* 154 */     bufferBuilder.func_181662_b(d1, d4, a).func_181666_a(f6, f7, f8, f5).func_181675_d();
/* 155 */     bufferBuilder.func_181662_b(d3, d4, a).func_181666_a(f6, f7, f8, f5).func_181675_d();
/* 156 */     tessellator.func_78381_a();
/*     */     
/* 158 */     GlStateManager.func_179103_j(7424);
/* 159 */     GlStateManager.func_179084_k();
/* 160 */     GlStateManager.func_179141_d();
/* 161 */     GlStateManager.func_179098_w();
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\zu.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */